extends Sprite2D

var gear;

@export var angle_per_spr = deg_to_rad(7.0);

var acc = 0;

var textrueOffset = Vector2(0, 0);


func _ready():
	gear = get_parent();
	textrueOffset = -Vector2(texture.get_width()/2, texture.get_height()/2);

func _process(delta):
	acc = deg_to_rad(gear.gear_speed) * delta;
	rotation += acc;
	while(abs(rotation) > PI * 5):
		rotation -= sign(rotation) * PI;
	queue_redraw();

func _draw():
	var gd = preload('res://scripts/gear/gear_spr/iliusion.gd');
	gd.index(self);

func get_size_rate():
	return texture.get_size();
